<?php 
require_once '../include/includefiles.php';
require_once '../include/userislogin.php';
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>用户修改</title>
<link href="images/style.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="images/jquery-1.7.2.min.js"></script>
</head>

<body>
<form name="form1" method="post" action="actions.php?act=role_add">
<table width="100%" align="center" bgcolor="#F7F8F9">
  <tr bgcolor="#E1E5EE">
    <td height="30" align="center" bgcolor="#E1E5EE">权限管理</td>
  </tr>
  <tr align="center">
    <td height="25" align="center">选择节点：
      <select name="right">
	   <option value="-1">根节点</option>
        </select></td>
    </tr>
  <tr align="center">
    <td height="25" align="center">
	<a class="add" href="#">新增</a>
	<a class="update" href="#">修改</a>
	<a class="del" href="#">删除</a>	</td>
  </tr>
</table>
</form>

<script>
  $(function(){
          $.post('actions.php?act=menutree',function(data){
        	  $("[name='right']").append(data);
          });
          $(".update").click(function(){
              var id = $("[name='right']").val();
              $url = "actions.php?act=menuchange&id="+id;
              window.location=$url;
          });
          $(".add").click(function(){
              var id = $("[name='right']").val();
              $url = "actions.php?act=menuadd&id="+id;
              window.location=$url;
          });
          $(".del").click(function(){
        	  var id = $("[name='right']").val();
        	  $url = "actions.php?act=menudel&id="+id;
        	  window.location=$url;
          });
  });
</script>
</body>
</html>
